﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NetPE.Core.Metadata;

namespace NetPE.TreeNodes
{
    class MdRootNode : BaseNode
    {
        public MdRootNode(MetadataRoot dat)
            : base(dat)
        {
            this.dat = dat;
            this.Text = "Metadata Root";
            this.ImageIndex = this.SelectedImageIndex = NodeType.Header;
            foreach (MetadataStream i in dat)
            {
                this.Nodes.Add(new MdStreamNode(i));
            }
        }

        MetadataRoot dat;
        public override object Data { get { return dat; } }

        public override BaseEditor GetEditorControl()
        {
            return new MdRootEditor(this);
        }
    }
}
